/******/
(function (modules) {
  // webpackBootstrap
  /******/ // The module cache
  /******/
  var installedModules = {}; /******/ // The require function
  /******/
  /******/ function __webpack_require__(moduleId) {
    /******/
    /******/ // Check if module is in cache
    /******/
    if (installedModules[moduleId]) {
      /******/
      return installedModules[moduleId].exports;
      /******/
    } /******/ // Create a new module (and put it into the cache)
    /******/ var module = (installedModules[moduleId] = {
      /******/
      i: moduleId,
      /******/
      l: false,
      /******/
      exports: {},
      /******/
    }); /******/ // Execute the module function
    /******/
    /******/ modules[moduleId].call(
      module.exports,
      module,
      module.exports,
      __webpack_require__
    ); /******/ // Flag the module as loaded
    /******/
    /******/ module.l = true; /******/ // Return the exports of the module
    /******/
    /******/ return module.exports;
    /******/
  } /******/ // expose the modules object (__webpack_modules__)
  /******/
  /******/
  /******/ __webpack_require__.m = modules; /******/ // expose the module cache
  /******/
  /******/ __webpack_require__.c = installedModules; /******/ // define getter function for harmony exports
  /******/
  /******/ __webpack_require__.d = function (exports, name, getter) {
    /******/
    if (!__webpack_require__.o(exports, name)) {
      /******/
      Object.defineProperty(exports, name, {
        /******/
        configurable: false,
        /******/
        enumerable: true,
        /******/
        get: getter,
        /******/
      });
      /******/
    }
    /******/
  }; /******/ // getDefaultExport function for compatibility with non-harmony modules
  /******/
  /******/ __webpack_require__.n = function (module) {
    /******/
    var getter =
      module && module.__esModule
        ? /******/
          function getDefault() {
            return module["default"];
          }
        : /******/
          function getModuleExports() {
            return module;
          };
    /******/
    __webpack_require__.d(getter, "a", getter);
    /******/
    return getter;
    /******/
  }; /******/ // Object.prototype.hasOwnProperty.call
  /******/
  /******/ __webpack_require__.o = function (object, property) {
    return Object.prototype.hasOwnProperty.call(object, property);
  }; /******/ // __webpack_public_path__
  /******/
  /******/ __webpack_require__.p = ""; /******/ // Load entry module and return exports
  /******/
  /******/ return __webpack_require__((__webpack_require__.s = 2));
  /******/
})(
  /************************************************************************/
  /******/
  [
    /* 0 */
    /***/
    function (module, exports, __webpack_require__) {
      /* WEBPACK VAR INJECTION */
      (function (process) {
        var defaultOptions = {
          // workerPath: 'https://cdn.rawgit.com/naptha/tesseract.js/0.2.0/dist/worker.js',
          corePath:
            "https://cdn.rawgit.com/naptha/tesseract.js-core/0.1.0/index.js",
          langPath: "https://cdn.rawgit.com/naptha/tessdata/gh-pages/3.02/",
        };

        if (process.env.NODE_ENV === "development") {
          console.debug("Using Development Configuration");
          defaultOptions.workerPath =
            location.protocol +
            "//" +
            location.host +
            "/dist/worker.dev.js?nocache=" +
            Math.random().toString(36).slice(3);
        } else {
          var version = __webpack_require__(1).version;
          defaultOptions.workerPath =
            "https://cdn.rawgit.com/naptha/tesseract.js/" +
            version +
            "/dist/worker.js";
        }

        exports.defaultOptions = defaultOptions;

        exports.spawnWorker = function spawnWorker(instance, workerOptions) {
          if (window.Blob && window.URL) {
            var blob = new Blob([
              'importScripts("' + workerOptions.workerPath + '");',
            ]);
            var worker = new Worker(window.URL.createObjectURL(blob));
          } else {
            var worker = new Worker(workerOptions.workerPath);
          }

          worker.onmessage = function (e) {
            var packet = e.data;
            instance._recv(packet);
          };
          return worker;
        };

        exports.terminateWorker = function (instance) {
          instance.worker.terminate();
        };

        exports.sendPacket = function sendPacket(instance, packet) {
          loadImage(packet.payload.image, function (img) {
            packet.payload.image = img;
            instance.worker.postMessage(packet);
          });
        };

        function loadImage(image, cb) {
          if (typeof image === "string") {
            if (/^\#/.test(image)) {
              // element css selector
              return loadImage(document.querySelector(image), cb);
            } else if (/(blob|data)\:/.test(image)) {
              // data url
              var im = new Image();
              im.src = image;
              im.onload = (e) => loadImage(im, cb);
              return;
            } else {
              var xhr = new XMLHttpRequest();
              xhr.open("GET", image, true);
              xhr.responseType = "blob";
              xhr.onload = (e) => loadImage(xhr.response, cb);
              xhr.onerror = function (e) {
                if (
                  /^https?:\/\//.test(image) &&
                  !/^https:\/\/crossorigin.me/.test(image)
                ) {
                  console.debug("Attempting to load image with CORS proxy");
                  loadImage("https://crossorigin.me/" + image, cb);
                }
              };
              xhr.send(null);
              return;
            }
          } else if (image instanceof File) {
            // files
            var fr = new FileReader();
            fr.onload = (e) => loadImage(fr.result, cb);
            fr.readAsDataURL(image);
            return;
          } else if (image instanceof Blob) {
            return loadImage(URL.createObjectURL(image), cb);
          } else if (image.getContext) {
            // canvas element
            return loadImage(image.getContext("2d"), cb);
          } else if (image.tagName == "IMG" || image.tagName == "VIDEO") {
            // image element or video element
            var c = document.createElement("canvas");
            c.width = image.naturalWidth || image.videoWidth;
            c.height = image.naturalHeight || image.videoHeight;
            var ctx = c.getContext("2d");
            ctx.drawImage(image, 0, 0);
            return loadImage(ctx, cb);
          } else if (image.getImageData) {
            // canvas context
            var data = image.getImageData(
              0,
              0,
              image.canvas.width,
              image.canvas.height
            );
            return loadImage(data, cb);
          } else {
            return cb(image);
          }
          throw new Error("Missing return in loadImage cascade");
        }

        /* WEBPACK VAR INJECTION */
      }.call(exports, __webpack_require__(4)));

      /***/
    },
    /* 1 */
    /***/
    function (module, exports) {
      module.exports = {
        _from: "tesseract.js",
        _id: "tesseract.js@1.0.10",
        _inBundle: false,
        _integrity: "sha1-4RqWrnYUeTnZIY+I4of7aUFLHl0=",
        _location: "/tesseract.js",
        _phantomChildren: {},
        _requested: {
          type: "tag",
          registry: true,
          raw: "tesseract.js",
          name: "tesseract.js",
          escapedName: "tesseract.js",
          rawSpec: "",
          saveSpec: null,
          fetchSpec: "latest",
        },
        _requiredBy: ["#USER", "/"],
        _resolved:
          "https://registry.npmjs.org/tesseract.js/-/tesseract.js-1.0.10.tgz",
        _shasum: "e11a96ae76147939d9218f88e287fb69414b1e5d",
        _spec: "tesseract.js",
        _where: "/media/smalltrees/DataCenter/Work/WebpackTest",
        author: "",
        browser: {
          "./src/node/index.js": "./src/browser/index.js",
        },
        bugs: {
          url: "https://github.com/naptha/tesseract.js/issues",
        },
        bundleDependencies: false,
        dependencies: {
          "file-type": "^3.8.0",
          "is-url": "^1.2.2",
          "jpeg-js": "^0.2.0",
          "level-js": "^2.2.4",
          "node-fetch": "^1.6.3",
          "object-assign": "^4.1.0",
          "png.js": "^0.2.1",
          "tesseract.js-core": "^1.0.2",
        },
        deprecated: false,
        description: "Pure Javascript Multilingual OCR",
        devDependencies: {
          "babel-preset-es2015": "^6.16.0",
          babelify: "^7.3.0",
          browserify: "^13.1.0",
          envify: "^3.4.1",
          "http-server": "^0.9.0",
          pako: "^1.0.3",
          watchify: "^3.7.0",
        },
        homepage: "https://github.com/naptha/tesseract.js",
        license: "Apache-2.0",
        main: "src/index.js",
        name: "tesseract.js",
        repository: {
          type: "git",
          url: "git+https://github.com/naptha/tesseract.js.git",
        },
        scripts: {
          build:
            "browserify src/index.js -t [ babelify --presets [ es2015 ] ] -o dist/tesseract.js --standalone Tesseract && browserify src/browser/worker.js -t [ babelify --presets [ es2015 ] ] -o dist/worker.js",
          release:
            "npm run build && git commit -am 'new release' && git push && git tag `jq -r '.version' package.json` && git push origin --tags && npm publish",
          start:
            "watchify src/index.js  -t [ envify --NODE_ENV development ] -t [ babelify --presets [ es2015 ] ] -o dist/tesseract.dev.js --standalone Tesseract & watchify src/browser/worker.js  -t [ envify --NODE_ENV development ] -t [ babelify --presets [ es2015 ] ] -o dist/worker.dev.js & http-server -p 7355",
          test: 'echo "Error: no test specified" & exit 1',
        },
        version: "1.0.10",
      };

      /***/
    },
    /* 2 */
    /***/
    function (module, exports, __webpack_require__) {
      //接收消息
      chrome.runtime.onMessage.addListener(function (
        request,
        sender,
        sendResponse
      ) {
        //接收background的消息，并回复
        if (request.key == "record") {
          customer = request.value;
          setContent(customer);
        }
      });

      //设置表单数据
      function setContent(customer) {
        document.getElementById('username_msg').value=customer.code;
        document.getElementById('password_msg').value=customer.pwd;
        // document.getElementById('sflx_sel').value=20;
        // document.getElementById('ry_sel').value=赵美玲;
      }

      /***/
    },
    /* 3 */
    /***/
    function (module, exports, __webpack_require__) {
      const adapter = __webpack_require__(0);
      const circularize = __webpack_require__(5);
      const TesseractJob = __webpack_require__(6);
      const objectAssign = __webpack_require__(7);
      const version = __webpack_require__(1).version;

      function create(workerOptions) {
        workerOptions = workerOptions || {};
        var worker = new TesseractWorker(
          objectAssign({}, adapter.defaultOptions, workerOptions)
        );
        worker.create = create;
        worker.version = version;
        return worker;
      }

      class TesseractWorker {
        constructor(workerOptions) {
          this.worker = null;
          this.workerOptions = workerOptions;
          this._currentJob = null;
          this._queue = [];
        }

        recognize(image, options) {
          return this._delay((job) => {
            if (typeof options === "string") {
              options = {
                lang: options,
              };
            } else {
              options = options || {};
              options.lang = options.lang || "eng";
            }

            job._send("recognize", {
              image: image,
              options: options,
              workerOptions: this.workerOptions,
            });
          });
        }
        detect(image, options) {
          options = options || {};
          return this._delay((job) => {
            job._send("detect", {
              image: image,
              options: options,
              workerOptions: this.workerOptions,
            });
          });
        }

        terminate() {
          if (this.worker) adapter.terminateWorker(this);
          this.worker = null;
        }

        _delay(fn) {
          if (!this.worker)
            this.worker = adapter.spawnWorker(this, this.workerOptions);

          var job = new TesseractJob(this);
          this._queue.push((e) => {
            this._queue.shift();
            this._currentJob = job;
            fn(job);
          });
          if (!this._currentJob) this._dequeue();
          return job;
        }

        _dequeue() {
          this._currentJob = null;
          if (this._queue.length > 0) {
            this._queue[0]();
          }
        }

        _recv(packet) {
          if (packet.status === "resolve" && packet.action === "recognize") {
            packet.data = circularize(packet.data);
          }

          if (this._currentJob.id === packet.jobId) {
            this._currentJob._handle(packet);
          } else {
            console.warn("Job ID " + packet.jobId + " not known.");
          }
        }
      }

      var DefaultTesseract = create();

      module.exports = DefaultTesseract;

      /***/
    },
    /* 4 */
    /***/
    function (module, exports) {
      // shim for using process in browser
      var process = (module.exports = {});

      // cached from whatever global is present so that test runners that stub it
      // don't break things.  But we need to wrap it in a try catch in case it is
      // wrapped in strict mode code which doesn't define any globals.  It's inside a
      // function because try/catches deoptimize in certain engines.

      var cachedSetTimeout;
      var cachedClearTimeout;

      function defaultSetTimout() {
        throw new Error("setTimeout has not been defined");
      }

      function defaultClearTimeout() {
        throw new Error("clearTimeout has not been defined");
      }
      (function () {
        try {
          if (typeof setTimeout === "function") {
            cachedSetTimeout = setTimeout;
          } else {
            cachedSetTimeout = defaultSetTimout;
          }
        } catch (e) {
          cachedSetTimeout = defaultSetTimout;
        }
        try {
          if (typeof clearTimeout === "function") {
            cachedClearTimeout = clearTimeout;
          } else {
            cachedClearTimeout = defaultClearTimeout;
          }
        } catch (e) {
          cachedClearTimeout = defaultClearTimeout;
        }
      })();

      function runTimeout(fun) {
        if (cachedSetTimeout === setTimeout) {
          //normal enviroments in sane situations
          return setTimeout(fun, 0);
        }
        // if setTimeout wasn't available but was latter defined
        if (
          (cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) &&
          setTimeout
        ) {
          cachedSetTimeout = setTimeout;
          return setTimeout(fun, 0);
        }
        try {
          // when when somebody has screwed with setTimeout but no I.E. maddness
          return cachedSetTimeout(fun, 0);
        } catch (e) {
          try {
            // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally
            return cachedSetTimeout.call(null, fun, 0);
          } catch (e) {
            // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error
            return cachedSetTimeout.call(this, fun, 0);
          }
        }
      }

      function runClearTimeout(marker) {
        if (cachedClearTimeout === clearTimeout) {
          //normal enviroments in sane situations
          return clearTimeout(marker);
        }
        // if clearTimeout wasn't available but was latter defined
        if (
          (cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) &&
          clearTimeout
        ) {
          cachedClearTimeout = clearTimeout;
          return clearTimeout(marker);
        }
        try {
          // when when somebody has screwed with setTimeout but no I.E. maddness
          return cachedClearTimeout(marker);
        } catch (e) {
          try {
            // When we are in I.E. but the script has been evaled so I.E. doesn't  trust the global object when called normally
            return cachedClearTimeout.call(null, marker);
          } catch (e) {
            // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error.
            // Some versions of I.E. have different rules for clearTimeout vs setTimeout
            return cachedClearTimeout.call(this, marker);
          }
        }
      }
      var queue = [];
      var draining = false;
      var currentQueue;
      var queueIndex = -1;

      function cleanUpNextTick() {
        if (!draining || !currentQueue) {
          return;
        }
        draining = false;
        if (currentQueue.length) {
          queue = currentQueue.concat(queue);
        } else {
          queueIndex = -1;
        }
        if (queue.length) {
          drainQueue();
        }
      }

      function drainQueue() {
        if (draining) {
          return;
        }
        var timeout = runTimeout(cleanUpNextTick);
        draining = true;

        var len = queue.length;
        while (len) {
          currentQueue = queue;
          queue = [];
          while (++queueIndex < len) {
            if (currentQueue) {
              currentQueue[queueIndex].run();
            }
          }
          queueIndex = -1;
          len = queue.length;
        }
        currentQueue = null;
        draining = false;
        runClearTimeout(timeout);
      }

      process.nextTick = function (fun) {
        var args = new Array(arguments.length - 1);
        if (arguments.length > 1) {
          for (var i = 1; i < arguments.length; i++) {
            args[i - 1] = arguments[i];
          }
        }
        queue.push(new Item(fun, args));
        if (queue.length === 1 && !draining) {
          runTimeout(drainQueue);
        }
      };

      // v8 likes predictible objects
      function Item(fun, array) {
        this.fun = fun;
        this.array = array;
      }
      Item.prototype.run = function () {
        this.fun.apply(null, this.array);
      };
      process.title = "browser";
      process.browser = true;
      process.env = {};
      process.argv = [];
      process.version = ""; // empty string to avoid regexp issues
      process.versions = {};

      function noop() {}

      process.on = noop;
      process.addListener = noop;
      process.once = noop;
      process.off = noop;
      process.removeListener = noop;
      process.removeAllListeners = noop;
      process.emit = noop;
      process.prependListener = noop;
      process.prependOnceListener = noop;

      process.listeners = function (name) {
        return [];
      };

      process.binding = function (name) {
        throw new Error("process.binding is not supported");
      };

      process.cwd = function () {
        return "/";
      };
      process.chdir = function (dir) {
        throw new Error("process.chdir is not supported");
      };
      process.umask = function () {
        return 0;
      };

      /***/
    },
    /* 5 */
    /***/
    function (module, exports) {
      // The result of dump.js is a big JSON tree
      // which can be easily serialized (for instance
      // to be sent from a webworker to the main app
      // or through Node's IPC), but we want
      // a (circular) DOM-like interface for walking
      // through the data.

      module.exports = function circularize(page) {
        page.paragraphs = [];
        page.lines = [];
        page.words = [];
        page.symbols = [];

        page.blocks.forEach(function (block) {
          block.page = page;

          block.lines = [];
          block.words = [];
          block.symbols = [];

          block.paragraphs.forEach(function (para) {
            para.block = block;
            para.page = page;

            para.words = [];
            para.symbols = [];

            para.lines.forEach(function (line) {
              line.paragraph = para;
              line.block = block;
              line.page = page;

              line.symbols = [];

              line.words.forEach(function (word) {
                word.line = line;
                word.paragraph = para;
                word.block = block;
                word.page = page;
                word.symbols.forEach(function (sym) {
                  sym.word = word;
                  sym.line = line;
                  sym.paragraph = para;
                  sym.block = block;
                  sym.page = page;

                  sym.line.symbols.push(sym);
                  sym.paragraph.symbols.push(sym);
                  sym.block.symbols.push(sym);
                  sym.page.symbols.push(sym);
                });
                word.paragraph.words.push(word);
                word.block.words.push(word);
                word.page.words.push(word);
              });
              line.block.lines.push(line);
              line.page.lines.push(line);
            });
            para.page.paragraphs.push(para);
          });
        });
        return page;
      };

      /***/
    },
    /* 6 */
    /***/
    function (module, exports, __webpack_require__) {
      const adapter = __webpack_require__(0);

      let jobCounter = 0;

      module.exports = class TesseractJob {
        constructor(instance) {
          this.id =
            "Job-" +
            ++jobCounter +
            "-" +
            Math.random().toString(16).slice(3, 8);

          this._instance = instance;
          this._resolve = [];
          this._reject = [];
          this._progress = [];
          this._finally = [];
        }

        then(resolve, reject) {
          if (this._resolve.push) {
            this._resolve.push(resolve);
          } else {
            resolve(this._resolve);
          }

          if (reject) this.catch(reject);
          return this;
        }
        catch(reject) {
          if (this._reject.push) {
            this._reject.push(reject);
          } else {
            reject(this._reject);
          }
          return this;
        }
        progress(fn) {
          this._progress.push(fn);
          return this;
        }
        finally(fn) {
          this._finally.push(fn);
          return this;
        }
        _send(action, payload) {
          adapter.sendPacket(this._instance, {
            jobId: this.id,
            action: action,
            payload: payload,
          });
        }

        _handle(packet) {
          var data = packet.data;
          let runFinallyCbs = false;

          if (packet.status === "resolve") {
            if (this._resolve.length === 0) console.log(data);
            this._resolve.forEach((fn) => {
              var ret = fn(data);
              if (ret && typeof ret.then == "function") {
                console.warn(
                  "TesseractJob instances do not chain like ES6 Promises. To convert it into a real promise, use Promise.resolve."
                );
              }
            });
            this._resolve = data;
            this._instance._dequeue();
            runFinallyCbs = true;
          } else if (packet.status === "reject") {
            if (this._reject.length === 0) console.error(data);
            this._reject.forEach((fn) => fn(data));
            this._reject = data;
            this._instance._dequeue();
            runFinallyCbs = true;
          } else if (packet.status === "progress") {
            this._progress.forEach((fn) => fn(data));
          } else {
            console.warn("Message type unknown", packet.status);
          }

          if (runFinallyCbs) {
            this._finally.forEach((fn) => fn(data));
          }
        }
      };

      /***/
    },
    /* 7 */
    /***/
    function (module, exports, __webpack_require__) {
      "use strict";
      /*
        object-assign
        (c) Sindre Sorhus
        @license MIT
        */

      /* eslint-disable no-unused-vars */
      var getOwnPropertySymbols = Object.getOwnPropertySymbols;
      var hasOwnProperty = Object.prototype.hasOwnProperty;
      var propIsEnumerable = Object.prototype.propertyIsEnumerable;

      function toObject(val) {
        if (val === null || val === undefined) {
          throw new TypeError(
            "Object.assign cannot be called with null or undefined"
          );
        }

        return Object(val);
      }

      function shouldUseNative() {
        try {
          if (!Object.assign) {
            return false;
          }

          // Detect buggy property enumeration order in older V8 versions.

          // https://bugs.chromium.org/p/v8/issues/detail?id=4118
          var test1 = new String("abc"); // eslint-disable-line no-new-wrappers
          test1[5] = "de";
          if (Object.getOwnPropertyNames(test1)[0] === "5") {
            return false;
          }

          // https://bugs.chromium.org/p/v8/issues/detail?id=3056
          var test2 = {};
          for (var i = 0; i < 10; i++) {
            test2["_" + String.fromCharCode(i)] = i;
          }
          var order2 = Object.getOwnPropertyNames(test2).map(function (n) {
            return test2[n];
          });
          if (order2.join("") !== "0123456789") {
            return false;
          }

          // https://bugs.chromium.org/p/v8/issues/detail?id=3056
          var test3 = {};
          "abcdefghijklmnopqrst".split("").forEach(function (letter) {
            test3[letter] = letter;
          });
          if (
            Object.keys(Object.assign({}, test3)).join("") !==
            "abcdefghijklmnopqrst"
          ) {
            return false;
          }

          return true;
        } catch (err) {
          // We don't expect any of the above to throw, but better to be safe.
          return false;
        }
      }

      module.exports = shouldUseNative()
        ? Object.assign
        : function (target, source) {
            var from;
            var to = toObject(target);
            var symbols;

            for (var s = 1; s < arguments.length; s++) {
              from = Object(arguments[s]);

              for (var key in from) {
                if (hasOwnProperty.call(from, key)) {
                  to[key] = from[key];
                }
              }

              if (getOwnPropertySymbols) {
                symbols = getOwnPropertySymbols(from);
                for (var i = 0; i < symbols.length; i++) {
                  if (propIsEnumerable.call(from, symbols[i])) {
                    to[symbols[i]] = from[symbols[i]];
                  }
                }
              }
            }

            return to;
          };

      /***/
    },
    /******/
  ]
);
